package service;

import dao.DataDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Service
public class AService {
	
	@Autowired
	private DataDao dataDao;
	@Autowired
	private BService bService;


	@Transactional(propagation= Propagation.REQUIRED)
	public void insertA(String data){
		dataDao.insert("A-"+data);
		bService.insertB(data);
		int i =1/0;

	}
}
